#pragma once

#include <vector>

/*
Utility class for calculating max, average and standard deviation in a sample.
*/
class Statistics
{
private:
	int length;
	short max;
	double average;
	double stdDeviation;

public:
	Statistics(void);
	~Statistics(void);

	void Calculate(short* sample, int length, bool useAbsoluteValues=true);

	int GetLength(){return length;}
	short GetMax(){return max;}
	double GetAverage(){return average;}
	double GetStdDeviation(){return stdDeviation;}

	static void GetStatistics(short* sample, int length, std::vector<Statistics>& receiver, int sliceLength, bool useAbsoluteValues=true);
};
